package com.liang.book.mapper;

import com.liang.book.model.Roles;
import com.liang.book.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

@Mapper
public interface UserMapper {
    @Select ("select * from user_info where delete_flag = 0 and user_name = #{userName}")
    UserInfo queryUserByName(String userName);

    UserInfo findByUserName(String userName);

    void save(UserInfo newUser);
    void insertUserInfo(UserInfo newUser);

    Roles findRole(String userName);

    UserInfo selectAdminInfo(String userName);

    void insertadmininfo(UserInfo newUser);
}
